<!DOCTYPE html>
<html>
<head>
	<title>代码生成</title>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<link rel="stylesheet" href="/static/layui/css/layui.css?t=1510415843040" media="all">
	<script src="/static/layui/layui.all.js"></script>
	<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
	<script src="/static/js/webutil.js?t=123"></script>
</head>
<body>
<div class="layui-fluid">
	<div class="layui-row">
	<fieldset class="layui-elem-field layui-field-title">
  		<legend>代码生成</legend>
	</fieldset>
	<form id="submitForm" action="/developer/generator/list.htm" autocomplete="on" method="get">
		<div class="layui-inline">
			<label>表名:</label>
			<div class="layui-input-inline">
				<input type="text" name="tableName" value="${tableName!''}" autocomplete="off" class="layui-input">
			</div>
			<button class="layui-btn layui-btn-radius layui-btn-sm" lay-submit lay-filter="submitForm">
				<i class="layui-icon">&#xe615;</i>查询
			</button>
			<button type="button" class="layui-btn layui-btn-sm layui-btn-primary layui-btn-radius" onclick="location.reload();">
				<i class="layui-icon">&#xe63d;</i>刷新
			</button>
			<button type="button" class="layui-btn layui-btn-sm layui-btn-primary layui-btn-radius" onclick="formReset()">
				<i class="layui-icon">&#x1002;</i>重置
			</button>
		</div>
	</form>
	<table class="layui-table" id="main-table" lay-filter="main-table" lay-even>
		<thead>
			<tr>
				<th lay-data="{field:'tablename'}">表名</th>
				<th lay-data="{field:'remarks'}">名称</th>
				<th lay-data="{field:'operation'}">操作</th>
			</tr>
		</thead>
		<tbody>
			<#list list as table>
			<tr>
				<td>${table.name}</td>
				<td>${table.remarks}</td>
				<td>
					<button class="layui-btn layui-btn-xs" onclick="editData(formUrl,'${table.name}','95%','90%')">生成文件</button>
					<button class="layui-btn layui-btn-xs layui-btn-warm" onclick="editData(menuUrl,'${table.name}','95%','90%')">插入菜单</button>
					<!-- <button class="layui-btn layui-btn-xs layui-btn-primary" onclick="editData(sqlUrl,'${table.name}','95%','90%')">sql</button> -->
				</td>
			</tr>
			</#list>
		</tbody>
	</table>
	</div>
</div>
<script type="text/javascript">
	var formUrl = "/developer/generator/form.htm";
	var menuUrl = "/developer/generator/menu.htm";
	var sqlUrl = "/developer/generator/sql.htm";
	
	layui.table.init('main-table',{
		 limit:300
	});
</script>
</body>
</html>